package com.example.dubbo.service.order.impl.demo;

import com.example.dubbo.aip.demo.OrderTblService;
import com.example.dubbo.aip.vo.demo.OrderTbl;
import com.example.dubbo.service.order.mapper.demo.OrderTblMapper;
import org.apache.dubbo.config.annotation.Service;

import javax.annotation.Resource;

/**
 * 订单类 ServiceImpl
 * ClassName:OrderTbl
 * Description: 用于Seata 分布式 事务 测试
 */

@Service(version = "1.0.0",timeout = 30000)
public class OrderTblServiceImpl implements OrderTblService {
    @Resource
    private OrderTblMapper orderTblMapper;
    @Override
    public void createOrder() {
        OrderTbl entity=new OrderTbl();
        entity.setId(2);
        entity.setUserId("1001");
        entity.setCommodityCode("2001");
        entity.setCount(1);
        entity.setMoney(1000);
        orderTblMapper.insert(entity);

    }
}